package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统设置
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_system_set")
public class SystemSet extends Model<SystemSet> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "code", type = IdType.ASSIGN_ID)
    private String code;
    /**
     * 参数名称
     */
    @TableField("name")
    private String name;
    /**
     * 值
     */
    @TableField("value")
    private String value;
    /**
     * 类型:0系统内置不能删除
     */
    @TableField("type")
    private Integer type;
    /**
     * 备注
     */
    @TableField("note")
    private String note;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    public void freeData() {
        this.code = null;
        this.name = null;
        this.value = null;
        this.type = null;
        this.note = null;
        this.addTime = null;
        this.updateTime = null;
    }

}
